home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / PET / S-Super PET / (s)t3.d64 / FORTRANPLOT < prev    next >
Text File  |  2009-01-18  |  407b  |  16 lines

  1. * plots a sin wave
  2. * (example of GENERATING a format specification)
  3.       character form
  4.       i=0
  5.       while i<100
  6.         i=i+1
  7.         s=sin(float(i)/10)
  8.         if (s.ge.0) then do
  9.            form='t'//cnvi2c(41+ifix(s*39))//',''*'',/,''+'',t40,''|'''
  10.         else do
  11.            form='t40,''!'',/,''+'''//',t'//cnvi2c(41+ifix(s*39))//',''+'''
  12.         end if
  13.         print  form
  14.       endloop
  15.       end
  16.